﻿@inherits BMenuContainer
<li role="menuitem" tabindex="0" aria-haspopup="true"
    class="el-submenu @(isActive?"is-active":"") @(IsOpened?"is-opened":"")"
    aria-expanded="@(IsOpened?"true":"")">
    <div @onmouseover="OnOverAsync"
         @onmouseout="OnOutAsync"
         @onclick="OnClick"
         @ref="Element"
         class="el-submenu__title"
         style="background-color:@backgroundColor;color:@textColor; border-bottom-color:@borderColor;">
        <i class="@(Icon ?? "el-icon-menu")" @onmouseover:stopPropagation  @onmouseout:stopPropagation></i>
        @Label
        <i class="el-submenu__icon-arrow el-icon-arrow-down" @onmouseover:stopPropagation @onmouseout:stopPropagation></i>
    </div>
    @if (IsVertical)
    {
        <ul role="menu" class="el-menu el-menu--inline" style="@(IsOpened?"":"display:none;")" data-old-padding-top="" data-old-padding-bottom="" data-old-overflow="" @ref="Container">
            <CascadingValue Value="this">
                @ChildContent
            </CascadingValue>
        </ul>
    }
</li>
